import request from "@/utils/request";

// 根据喜欢量查询
export function findByLikes(params) {
  return request({
    url: "/dream/findByLikes",
    method: "post",
    data: params
  });
}

// 根据时间查询
export function findByTime(params) {
  return request({
    url: "/dream/findByTime",
    method: "post",
    data: params
  });
}

// 随机查询
export function findByRand(params) {
  return request({
    url: "/dream/findByRand",
    method: "post",
    data: params
  });
}

// 新增梦想
export function addDream(params) {
  return request({
    url: "/dream/addDream",
    method: "post",
    data: params
  });
}

// 点赞
export function increaseLikeCount(params) {
  return request({
    url: "/dream/increaseLikeCount",
    method: "post",
    data: params
  });
}

// 取消点赞
export function decreaseLikeCount(params) {
  return request({
    url: "/dream/decreaseLikeCount",
    method: "post",
    data: params
  });
}
